﻿using System;
using System.Runtime.Serialization;

namespace Dapper.Core
{
    /// <summary>
    /// 查询条件公共实体类
    /// </summary>
    [Serializable]
    [DataContract]
    public class SearchParam<T>
    {

        /// <summary>
        /// 获取或设置当前页码
        /// </summary>
        [DataMember]
        public int PageIndex
        {
            get; set;
        }

        /// <summary>
        /// 获取或设置每页显示的记录
        /// </summary>
        [DataMember]
        public int PageSize
        {
            get; set;
        }

        /// <summary>
        /// 关键词
        /// </summary>
        [DataMember]
        public string Keywords
        {
            get; set;
        }

        /// <summary>
        /// 排序方式 默认asc 
        /// </summary>
        [DataMember]
        public string Order
        {
            get; set;
        }

        /// <summary>
        /// 排序字段
        /// </summary>
        [DataMember]
        public string Sort
        {
            get; set;
        }

        /// <summary>
        /// 查询条件
        /// </summary>
        [DataMember]
        public T Filter { get; set; }
    }
}
